﻿<%@ Page Title="" Language="C#" AutoEventWireup="true" CodeBehind="exportaExcel.aspx.cs" Inherits="eepg_contratos.Views.Shared.exportaExcel" %>

<%
    String content = Request.QueryString["datos_a_enviar"];
    String nombre = Request.QueryString["nombre"];
    String titulo = Request.QueryString["contenido"];
    Response.ContentType = "application/vnd.ms-excel"; //Tipo de fichero.
    Response.AppendHeader("Content-Disposition", "attachment;filename=" + nombre + ".xls");
%>

<html xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:x="urn:schemas-microsoft-com:office:excel" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<!--[if gte mso 9] -->
<xml>
<x:ExcelWorkbook>
    <x:ExcelWorksheets>
        <x:ExcelWorksheet>
            <x:Name><%=nombre%></x:Name>
            <x:WorksheetOptions>
                <x:DisplayGridlines/>
            </x:WorksheetOptions>
        </x:ExcelWorksheet>
    </x:ExcelWorksheets>
</x:ExcelWorkbook>
</xml><!--[endif]-->
</head>
<body>
<table border="0" cellpadding="5" cellspacing="5">
<tr><td  colspan="10"><%=titulo%></td></tr>
<tr>
<td>
<%=content%>
</td>
</tr>
</table>
</body>
</html>

